<script setup>
import { onMounted, ref } from 'vue'
onMounted(()=>{
  console.log('mounted1')
}),
onMounted(()=>{
  console.log('mounted2')
})
const message = ref("")
const getMessage = (msg)=>{
  console.log(msg)
  message.value = msg
}
import sonCom from '@/components/son-com.vue'
</script>
<template>
  <sonCom msg="这是一段话，给孩子" @update:msg="getMessage"></sonCom>
  <div>{{message}}</div>
</template>


<style lang="scss" scoped>

</style>